package com.bdqn.service.impl;

import com.bdqn.dao.smbms_providerDao;
import com.bdqn.entity.provider;
import com.bdqn.service.smbms_providerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
@Transactional
//@Scope("singleton")
public class smbms_providerServiceImpl implements smbms_providerService {
    @Autowired
    @Qualifier("smbms_providerDao")
    private smbms_providerDao po;


    public List<provider> getAllproviderByparam(String proName, String proCode) {
        return po.getAllproviderByparam(proName,proCode);
    }
    public int updproviderByid(provider pro) {
        return po.updproviderByid(pro);
    }

    public List<provider> findbillByproIdArray(Integer[] ids) {
        return po.findbillByproIdArray(ids);
    }

    public List<provider> findbillByproIdList(List<Integer> ids) {
        return po.findbillByproIdList(ids);
    }

    public List<provider> findbillByproIdMap(Map<String, Object> ids) {
        return po.findbillByproIdMap(ids);
    }

    public List<provider> findproviderByparam(String proCode, String proName, String proContact) {
        return po.findproviderByparam(proCode,proName,proContact);
    }

    public provider getproviderAndbill(Integer id) {
        return po.getproviderAndbill(id);
    }

    @Override
    public List<provider> providerList() {
        return po.providerList();
    }

    @Override
    public List<provider> findproviderByparams(Map map) {
        return po.findproviderByparams(map);
    }

    @Override
    public int findAllCount(Map map) {
        return po.findAllCount(map);
    }

    @Override
    public int delprovider(Integer id) {
        return po.delprovider(id);
    }

    @Override
    public int addprovider(provider pro) {
        System.out.println("service:"+pro+"=================");
        return po.addprovider(pro);
    }
}
